import axios from '../request'
import config from './config'
import { DTO, Params } from './type'

// 可用油站列表
export async function getUsableStation(params: Params.UsableSearchParams) {
    try {
        const res = await axios.post<CNPC.Res.page<DTO.SearchStation>>(config.getUsableStationUrl, params)
        return {
            list: res.data.data.records,
            total: res.data.data.total
        }
    } catch (e) {
        return {
            list: [],
            total: 0
        }
    }
}
